<?php 
	if(isset($error))
	{
		echo "<p style='text-align:center; padding: 5px; font-weight: bold'>".$error."</p>";
	}
	
?>

<form action="<?php echo base_url().'admin/members/add';?>" method="post" enctype="multipart/form-data">
<table class="class_table">
	<tr>
    	<td colspan="2"><h2 class="class_h2">Thay đổi thông tin cá nhân</h2></td>
    </tr>
	<tr>
    	<td>Họ và Tên</td>
        <td><input type="text" name="txt_fullname" value="<?php echo set_value('txt_fullname');?>" /></td>
    </tr>
    <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_fullname');?></td>
    </tr>
    <tr>
    	<td>Phân quyền</td>
        <td><select name="txt_level">
        	<option value="">---Chọn---</option>
        	<option value="1"<?php echo set_select('txt_level',1);?> selected="selected">Quản lý</option>
            <option value="2"<?php echo set_select('txt_level',2);?>>Thông thường</option>
        </select></td>
    </tr>
    <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_level');?></td>
    </tr>
    <tr>
    	<td>Username</td>
        <td><input type="text" name="txt_username" value="<?php echo set_value('txt_username');?>" /></td>
    </tr>
    <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_username');?></td>
    </tr>
    <tr>
    	<td>Password</td>
        <td><input type="password" name="txt_pass" value="<?php echo set_value('txt_pass');?>" /></td>
    </tr>
     <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_pass');?></td>
    </tr>
     <tr>
    	<td>Re-Password</td>
        <td><input type="password" name="txt_pass2" value="<?php echo set_value('txt_pass2');?>" /></td>
    </tr>
     <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_pass2');?></td>
    </tr>
    <tr>
    	<td>Hình ảnh</td>
        <td><input type="file" name="txt_file" value="<?php echo set_value('txt_file');?>" /></td>
    </tr>
     <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_file');?></td>
    </tr>
    <tr>
    	<td>Giới tính</td>
        <td>
        <select name="txt_gender">
        	<option value="">---Chọn---</option>
        	<option value="0"<?php echo set_select('txt_gender',0);?> selected="selected">Nam</option>
            <option value="1"<?php echo set_select('txt_gender',1);?>>Nữ</option>
        </select>
        </td>
    </tr>
     <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_gender');?></td>
    </tr>
     <tr>
    	<td>Ngày sinh</td>
        <td><input type="text" name="txt_date" value="<?php echo set_value('txt_date');?>" />(18/03/1991)</td>
    </tr>
     <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_date');?></td>
    </tr>
     <tr>
    	<td>Địa chỉ</td>
        <td><input type="text" name="txt_address" value="<?php echo set_value('txt_address');?>" /></td>
    </tr>
     <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_address');?></td>
    </tr>
    <tr>
    	<td>Tỉnh/Thành phố</td>
        <td>
        <select name="txt_city">
        	<option value="" selected="selected">---Chọn---</option>
        	<option value="1"<?php echo set_select('txt_city',1);?> selected="selected">Hà nội</option>
            <option value="2"<?php echo set_select('txt_city',2);?>>Hồ Chí Minh</option>
        </select>
        </td>
    </tr>
     <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_city');?></td>
    </tr>
    <tr>
    	<td>Số điện thoại</td>
        <td><input type="text" name="txt_phone" value="<?php echo set_value('txt_phone');?>" /></td>
    </tr>
     <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_phone');?></td>
    </tr>
    <tr>
    	<td>Email</td>
        <td><input type="text" name="txt_email" value="<?php echo set_value('txt_email');?>" /></td>
    </tr>
     <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_email');?></td>
    </tr>
    <tr>
    	<td>Yahoo</td>
        <td><input type="text" name="txt_yahoo" value="<?php echo set_value('txt_yahoo');?>" /></td>
    </tr>
     <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_yahoo');?></td>
    </tr>
     <tr>
    	<td>Skype</td>
        <td><input type="text" name="txt_skype" value="<?php echo set_value('txt_skype');?>" /></td>
    </tr>
     <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_skype');?></td>
    </tr>
    
    <tr>
    	<td>Thông tin</td>
        <td><textarea name="txt_info"></textarea></td>
    </tr>
     <tr>
    	<td></td>
        <td style="color:#fff; font-weight:bold; background:red;"><?php echo form_error('txt_info');?></td>
    </tr>
    
    
    
    <tr>
    	<td><input type="hidden" name="image" value="<?php echo @$result->avarta;?>" />
        <input type="hidden" name="uid" value="<?php echo @$result->id;?>" />
        </td>
        <td><input type="submit" name="submit" value="Submit" /></td>
    </tr>
</table>
</form>